import java.util.ArrayList;
import java.util.List;

public class Team {

    private String teamId;
    private String teamName;
    private String department;
    private Student creator;

    List<Student> students = new ArrayList<>();
    List<Teacher> teachers = new ArrayList<>();

    public Team(String teamId, String teamName, String department, Student creator) {
        this.teamId = teamId;
        this.teamName = teamName;
        this.department = department;
        this.creator = creator;
    }

    public String getTeamId() {
        return teamId;
    }

    public String getTeamName() {
        return teamName;
    }

    public String getDepartment() {
        return department;
    }

    public Student getCreator() {
        return creator;
    }

    @Override
    public String toString() {
        StringBuilder team = new StringBuilder();
        team.append("Team{").
                append("teamId='").append(teamId).
                append(", teamName=").append(teamName).
                append(", department='").append(department).
                append(", creator=").append(creator.getName()).append("'}");
        return team.toString();
    }

    public void addStudent(Student student){
        this.students.add(student);
    }

    public void addTeacher(Teacher teacher){
        this.teachers.add(teacher);
    }

    public List<Student> getStudentList(){
        return this.students;
    }

    public List<Teacher> getTeacherList(){
        return this.teachers;
    }

}
